package guess;

/**
 * @classname:Computer
 * @description:
 * @author: Mr.Z
 * @date: 2020/11/27 19:36
 * @version: 0.1
 * @since:1.8
 */
public class Computer {
    private String name;
    private int score;

    public Computer() {
    }

    public Computer(String name, int score) {
        this.name = name;
        this.score = score;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    public int showFist() {
        int computerFit = (int) ((Math.random() * 3)+1);
        String result = "";
        switch (computerFit){
            case 1:
                result = "剪刀";
                break;
            case 2:
                result = "石头";
                break;
            case 3:
                result = "布";
                break;
        }
        System.out.println(this.name+"出拳"+result);
        return computerFit;
    }

}
